<template>
  <div class="bucket-container">
    <!-- <div class="bucket-navbar-container">
      <el-menu class="bucket-menu" :router="true" :default-active="index">
        <el-menu-item-group>
          <template slot="title">文件管理</template>
          <el-menu-item index="/active/document_release_list">
            <i class="el-icon-folder-checked" />
            <span slot="title">现行文件</span>
          </el-menu-item>
        </el-menu-item-group>
      </el-menu>
    </div> -->
    <!-- <div class="bucket-main-container"> -->
      <router-view />
    <!-- </div> -->
  </div>
</template>

<script>
import { pageTodoCount } from '@/api/xd/documentFlow'
import { mapGetters } from 'vuex'
export default {
  data() {
    return {
      index: '/active',
      sign: ''
    }
  },
  mounted() {
    this.index = this.$router.history.current.path
    this.getList()
    this.disposeData(this.roles)
  },
  computed: {
    ...mapGetters(['menusMap', 'roles'])
  },
  methods: {
    async getList() {
      await pageTodoCount()
        .then((res) => {
          this.$store.commit('message/FLOW_COUNT', res.data)
        })
        .finally(() => {
          this.listLoading = false
        })
    },
    disposeData(roles) {
      roles.forEach((item) => {
        if (item === 'qa') {
          this.sign = 1
        }
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.bucket-menu {
  .el-menu-item {
    .el-badge {
      height: 24px;
      line-height: 24px;
    }
  }
}
</style>
